"use strict";function check_usb_permissions(s){chrome.permissions.contains(usbPermissions,function(i){i?GUI.optional_usb_permissions=!0:(console.log("Optional USB permissions: missing"),GUI.log(getMessage("please_grant_usb_permissions")),$("div.optional_permissions").show(),document.getElementById("requestOptionalPermissions").addEventListener("click",function(){chrome.permissions.request(usbPermissions,function(s){s&&(GUI.log(getMessage("usb_permissions_granted")),$("div.optional_permissions").hide(),GUI.optional_usb_permissions=!0)})})),s&&s()})}var usbDevices={STM32DFU:{vendorId:1155,productId:57105}},usbPermissions={permissions:[{usbDevices:[usbDevices.STM32DFU]}]};